package wangm.service;

import wangm.bean.ExaminationOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * describe
 *
 * @author zk
 * @date 2018-02-23 11:18
 */
@Service
public class ExaminationOptionServiceImp {
    private static Logger logger = LoggerFactory.getLogger(ExaminationOptionServiceImp.class);

    /**
     * 根据小题id获取其选项
     *
     * @param topicId topicId
     * @return list<TopicOptionBean></>
     */
    public List<ExaminationOption> getTopicOptionByTopicId(String topicId){
        List<ExaminationOption> result = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            ExaminationOption examinationOption = new ExaminationOption();
            examinationOption.setId(String.valueOf(new Random().nextInt(1000)));
            examinationOption.setOptionContent("选项" + new Random().nextInt(1000));
            result.add(examinationOption);
        }
        return result;
    }
}
